<?php

/* * 
 * 锋币记录
 */
namespace Api\Model;
use Think\Model;
class ScoreDetailModel extends Model {

    //获取锋币流水详情
    public function getScoreDetailByUserId($userId, $pageNum) {

        $map['user_id'] = $userId;
        $list = $this
            ->field("detail_id, create_time, score, detail_status, detail_type, comment")
            ->where($map)
            ->order("create_time DESC")
            ->limit(($pageNum-1)*C('DEFAULT_PAGE_SIZE') . ',' . C('DEFAULT_PAGE_SIZE'))
            ->select();

        return $list;

    }

}

